package com.hmall.model;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.math.BigDecimal;

@Table(name = "mall_price")
public class MallPrice {
    @Id
    @Column(name = "price_id")
    private Integer priceId;

    /**
     * 产品id
     */
    @Column(name = "product_id")
    private Integer productId;

    /**
     * 起始价格
     */
    @Column(name = "price_start")
    private Integer priceStart;

    /**
     * 终点价格（左开右闭）
     */
    @Column(name = "price_end")
    private Integer priceEnd;

    /**
     * 当前挡位的价格
     */
    @Column(name = "price_num")
    private BigDecimal priceNum;

    public String getGrade() {
        return grade;
    }

    public void setGrade(String grade) {
        this.grade = grade;
    }

    @Column(name = "grade")
    private String grade;

    /**
     * @return price_id
     */
    public Integer getPriceId() {
        return priceId;
    }

    /**
     * @param priceId
     */
    public void setPriceId(Integer priceId) {
        this.priceId = priceId;
    }

    /**
     * 获取产品id
     *
     * @return product_id - 产品id
     */
    public Integer getProductId() {
        return productId;
    }

    /**
     * 设置产品id
     *
     * @param productId 产品id
     */
    public void setProductId(Integer productId) {
        this.productId = productId;
    }

    /**
     * 获取起始价格
     *
     * @return price_start - 起始价格
     */
    public Integer getPriceStart() {
        return priceStart;
    }

    /**
     * 设置起始价格
     *
     * @param priceStart 起始价格
     */
    public void setPriceStart(Integer priceStart) {
        this.priceStart = priceStart;
    }

    /**
     * 获取终点价格（左开右闭）
     *
     * @return price_end - 终点价格（左开右闭）
     */
    public Integer getPriceEnd() {
        return priceEnd;
    }

    /**
     * 设置终点价格（左开右闭）
     *
     * @param priceEnd 终点价格（左开右闭）
     */
    public void setPriceEnd(Integer priceEnd) {
        this.priceEnd = priceEnd;
    }

    /**
     * 获取当前挡位的价格
     *
     * @return price_num - 当前挡位的价格
     */
    public BigDecimal getPriceNum() {
        return priceNum;
    }

    /**
     * 设置当前挡位的价格
     *
     * @param priceNum 当前挡位的价格
     */
    public void setPriceNum(BigDecimal priceNum) {
        this.priceNum = priceNum;
    }

    @Override
    public String toString() {
        return "MallPrice{" +
                "priceId=" + priceId +
                ", productId=" + productId +
                ", priceStart=" + priceStart +
                ", priceEnd=" + priceEnd +
                ", priceNum=" + priceNum +
                ", grade='" + grade + '\'' +
                '}';
    }
}